package com.yc.entity;

import java.util.Date;
import java.util.Objects;

public class StudentEntity {
    private String name;
    private Integer age;
    private Boolean sex;
    private Date birthDay;

    public StudentEntity() {
    }

    public StudentEntity(String name, Integer age, Boolean sex, Date birthDay) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.birthDay = birthDay;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StudentEntity that = (StudentEntity) o;
        return Objects.equals(name, that.name) && Objects.equals(age, that.age) && Objects.equals(sex, that.sex) && Objects.equals(birthDay, that.birthDay);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age, sex, birthDay);
    }
}
